//
//  SLPermissionSetView.m
//  SlockApp
//
//  Created by 凯朱 on 2024/7/25.
//

#import "SLPermissionSetView.h"

@implementation SLPermissionSetView
-(void)awakeFromNib{
    [super awakeFromNib];
    _bgView1.layer.cornerRadius = 20;
    _bgView1.layer.masksToBounds = YES;
    
    _bgView2.layer.cornerRadius = 20;
    _bgView2.layer.masksToBounds = YES;
    
    _topLbl.text = kLocalString(@"HEXFORCE will not collect or use your personal information without your permissions. You could disable the permissions anytime when not needed.");
    _perLbl1.text = kLocalString(@"Location");
    _perContent1.text = kLocalString(@"Allowed");
    _perTipLbl1.text = kLocalString(@"Allow HEXFORCE app to discover and connect nearby SwitchBot Bluetooth devices and obtain WLAN list.");
    
    _perLbl2.text = kLocalString(@"Bluetooth");
    _perContentLbl2.text = kLocalString(@"Allowed");
    _perTipLbl2.text = kLocalString(@"Allow Bluetooth Permissions to scan, add, and control HEXFORCE Bluetooth devices.");
    
    kWeakSelf(self);
    _bgView1.userInteractionEnabled = YES;
    UITapGestureRecognizer *tap1 = [[UITapGestureRecognizer alloc] initWithActionBlock:^(id  _Nonnull sender) {
        if (weakself.btnBlock) weakself.btnBlock(1);
    }];
    [_bgView1 addGestureRecognizer:tap1];
    
    _bgView2.userInteractionEnabled = YES;
    UITapGestureRecognizer *tap2 = [[UITapGestureRecognizer alloc] initWithActionBlock:^(id  _Nonnull sender) {
        if (weakself.btnBlock) weakself.btnBlock(2);
    }];
    [_bgView2 addGestureRecognizer:tap2];
    

}


@end
